package cn.edu.zafu.bigdata.lekang;

public class Course {
    // 定义课程类的属性
    private String name;
    private String code;
    private String instructor;
    private String time;

    // 构造函数
    public Course(String name, String code, String instructor, String time) {
        this.name = name;
        this.code = code;
        this.instructor = instructor;
        this.time = time;
    }

    // 打印方法，用于输出课程信息
    public void print() {
        System.out.println("Course Name: " + name);
        System.out.println("Course Code: " + code);
        System.out.println("Instructor: " + instructor);
        System.out.println("Time: " + time);
    }

    // 为了测试，可以添加main方法
    public static void main(String[] args) {
        Course myCourse = new Course("数据结构", "CS101", "张三", "周一, 周三, 周五 10:00 AM");
        myCourse.print(); // 调用print方法输出课程信息
    }
}